﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using MoneyLover.WCFMoneyLover;
namespace MoneyLover
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor

        WCFMoneyLover.MoneyLoverServiceClient _WCF = new WCFMoneyLover.MoneyLoverServiceClient();
        public MainPage()
        {
            InitializeComponent();
        }

        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            if (Contanst._tkdangnhap == null)
            {
                NavigationService.Navigate(new Uri("/Pages/Login.xaml", UriKind.Relative));
            }
            else
            {
                //PageTitle.Text = Contanst._tkdangnhap.USERNAME.ToString();
            }
           
                
        }

        private void btnthemGD_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Pages/Giaodich.xaml", UriKind.Relative));
        }

        private void btnsochitieu_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Pages/SoChiTieu.xaml", UriKind.Relative));
        }

        private void btnsono_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Pages/Sono.xaml", UriKind.Relative));
        }

        private void btnthongke_Click(object sender, RoutedEventArgs e)
        {

        }

        private void btnkehoach_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Pages/KeHoach.xaml", UriKind.Relative));
        }

        private void btncongcu_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Pages/Congcu.xaml", UriKind.Relative));
        }

        private void btndangxuat_Click(object sender, RoutedEventArgs e)
        {
            Contanst._tkdangnhap = null;
            NavigationService.Navigate(new Uri("/Pages/Login.xaml", UriKind.Relative));
        }
    }
}